package com.starlink.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.starlink.common.PageInfoTwo;
import com.starlink.model.domain.AddressDO;
import com.starlink.model.request.AddressRequest;
import com.starlink.model.vo.AddressVO;

import java.util.List;

/**
 * @author zhanghong
 */
public interface AddressService extends IService<AddressDO> {

    /**
     * 根据主键查询
     * @param id
     * @return
     */
     AddressVO getByKey(long id);
    /**
     * 分页查询，手动分页
     * @param request
     * @return
     */
    PageInfoTwo<AddressVO> pageQuery(AddressRequest request);
    /**
     * 列表查询
     * @param request
     * @return
     */
    List<AddressVO> listQuery(AddressRequest request);
    /**
     * 新增
     * @param request
     * @return
     */
    Boolean add(AddressRequest request);
    /**
     * 根据主键更新
     * @param request
     * @return
     */
    Boolean updateByKey(AddressRequest request);
    /**
     * 根据主键删除
     * @param id
     * @return
     */
    Boolean deleteByKey(long id);

    /**
     * @param addressId
     * @return  省ID-市ID-区ID
     */
    String selectInfoById(Long addressId);
}
